<!DOCTYPE html>

<html>

	<head>
		<meta charset="UTF-8">
		<title>签到管理</title>
		<script src="js/global1.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/test.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
		$(function(){
			init();
		})
		//初始化
		function getDateTimeStr() {
			var s = "";
			var d = new Date();
			s += d.getFullYear() + "/";
			s += (d.getMonth() + 1) + "/";
			s += d.getDate() + " ";
			return s;
		}
		function init(){
			var date=getDateTimeStr();
			$('#dg').datagrid({    
			    url:globalData.pre+'/SelectQiandao',    
			    method:"post",
			    pagination:true,
			    queryParams: {
			    	qdate:date,
					quname:$("#name").val(),
					qstatus:$("#qstatus").val(),
					qqiantui:$("#qqiantui").val(),
					minqtime:$("#minqita").timespinner('getValue'),
					maxqtime:$("#maxqita").timespinner('getValue'),
			    	}
			}); 
			
		}
		
		function initt(){
			$('#dg').datagrid({    
			    url:globalData.pre+'/SelectQiandao',    
			    method:"post",
			    pagination:true,
			    queryParams: {
			    	qdate:$("#qdate").datebox('getValue'),
					quname:$("#name").val(),
					qstatus:$("#qstatus").val(),
					qqiantui:$("#qqiantui").val(),
					minqtime:$("#minqita").timespinner('getValue'),
					maxqtime:$("#maxqita").timespinner('getValue'),
			    	}
			}); 
			
		}
		//后面的操作
		function caozuo(value,row,index){
			return "<a href='javascript:void(0)' onclick='cha("+index+")' class='easyui-linkbutton'>查看</a>   "			
		}
		
		
		function updOK() {
			$('#upddiv').window('close');
		}
		
		//打开修改面板
		function cha(index){
			var data = $("#dg").datagrid("getData");
			var row = data.rows[index];
			$("#xg").form("load",row);
			$('#upddiv').window('open'); 
		}
		
	/*	function zhuangtai(value,row,index){
		}*//*,formatter:zhuangtai*/
		</script>
	</head>
	
	<body>
		<form id="ss">
			
	        <label>员工姓名:</label>   
	        <input class="easyui-validatebox" type="text"  id="name"/>   
	        
	        <label>签到状态</label>   
	        <select id="qstatus" class="easyui-combobox" style="width:100px;">  
	        	<option value="">---选择---</option>   
			    <option value="正常">正常</option>   
			    <option value="迟到">迟到</option>   
			    <option value="请假">请假</option>   
			    <option value="旷班">旷班</option>   
			</select>
			<label>签退状态</label>   
	        <select id="qqiantui" class="easyui-combobox" style="width:100px;">  
	        	<option value="">---选择---</option>   
			    <option value="正常">正常</option>   
			    <option value="早退">早退</option>   
			</select>
			<br>
			<label>签到时间</label>   
			<input  id="qdate"  type= "text" class= "easyui-datebox" >   
	        <input  id="minqita"  type= "text" class= "easyui-timespinner"  >  
	        <label>~</label>   
	        <input  id="maxqita"   type= "text" class= "easyui-timespinner"  > 
			<br>
		
			<a id="btn" href="javascript:void(0)" onclick="initt()" class="easyui-linkbutton" data-options="iconCls:'icon-search'">搜索</a>   
		
			
	</form>
	
		<table id="dg" class="easyui-datagrid"    >   
		     <thead>   
		        <tr>   
		            <th data-options="field:'qid',hidden:true">编号</th>   
		            <th data-options="field:'quname'">员工姓名</th>   
		            <th data-options="field:'qdate'">签到日期</th>   
		            <th data-options="field:'qtime'">签到时间</th>   
		            <th data-options="field:'qstatus'">状态</th>  
		            <th data-options="field:'qqiantui'">签退</th>  
		            <th data-options="field:'caozuo',formatter:caozuo">操作</th>   
		        </tr>   
		    </thead>   
		</table>  	
		
		<div id="upddiv" class="easyui-window" title="修改用户" style="width: 300px; height: 250px"
		data-options="title:'查看窗口',closed:true,modal:true">
		<form id="xg" class="easyui-form">
			<table>
				
				<tr>
					<td>员工姓名：</td>
					<td><input type="text"  disabled="disabled" class="easyui-textbox"  
						name="quname" /></td>
				</tr>
					
				<tr>
					<td>签到日期:</td>
					<td><input type="text" disabled="disabled" class="easyui-textbox"  
						name="qdate" /></td>
				</tr>
				
				<tr>
					<td>签到时间:</td>
					<td><input type="text" disabled="disabled" class="easyui-textbox"  
						name="qtime" /></td>
				</tr>
				
				
				<tr>
					<td>签到状态:</td>
					<td><input type="text" disabled="disabled" class="easyui-textbox"  
						name="qstatus" /></td>
				</tr>
				<tr>
					<td>是否签退:</td>
					<td><input type="text" disabled="disabled" class="easyui-textbox"  
						name="qqiantui" /></td>
				</tr>
				
				<tr>
				<td></td>
				<td>
				<a type="button" class="easyui-linkbutton" style="width: 100px" onclick="updOK()">确定</a>
				</td>
				</tr>
			</table>
			
		</form>
	</div>
</body>

</html>